package com.bdd.mapper;

import com.bdd.entity.Clothing;
import com.bdd.model.bo.clothing.ClothingBO;
import com.bdd.model.bo.clothing.ClothingForOrderItemBO;
import com.github.pagehelper.Page;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author huanghaining
 * @date 2022/3/18
 */
@Repository
public interface ClothingDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Clothing record);

    int insertSelective(Clothing record);

    Clothing selectByPrimaryKey(Integer id);

    ClothingForOrderItemBO selectCFOBO(@Param("cid") Integer cid, @Param("sizeId") Integer sizeId);

    List<Clothing> selectAll();

    Page<ClothingBO> selectBOList();

    List<ClothingBO> searchByName(@Param("name") String name);

    int updateByPrimaryKeySelective(Clothing record);

    int updateByPrimaryKey(Clothing record);
}